/*
 * @Author: likaijie 847094299@qq.com
 * @Date: 2025-04-02 16:21:15
 * @LastEditors: 深海有鱼 847094299@qq.com
 * @LastEditTime: 2025-08-24 18:11:50
 * @Description:
 */
import { http } from "@/utils/http";
/** 用户登录 */
export const login = (data: {
  username: string;
  password: string;
  otpCode?: string;
}) => {
  return http.request<any>("post", "/api/auth/login", { data });
};

/** 用户退出登录 */
export const loginOut = () => {
  return http.request<any>("post", "/api/auth/logout");
};

/** 用户注册 */
export const register = (data: {
  username: string;
  password: string;
  confirmPassword: string;
}) => {
  return http.request<any>("post", "/api/auth/register", {
    data
  });
};
